Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Darwin] MTRDeviceConnectivityMonitor should weakify before using self in a handler block #33395

Conversation

jtung-apple
Copy link
Contributor

To avoid retain cycle and block capturing issues MTRDeviceConnectivityMonitor use a weak self in the handler blocks given to nw_connection.

Copy link

github-actions bot commented May 9, 2024

PR #33395: Size comparison from d1d0d2b to 4776792

Decreases (1 build for efr32)
platform target config section d1d0d2b 4776792 change % change
efr32 window-app BRD4187C (read/write) 1137720 1137712 -8 -0.0
.text 969748 969740 -8 -0.0
Full report (80 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink)
platform target config section d1d0d2b 4776792 change % change
bl602 lighting-app bl602 (read/write) 1444554 1444554 0 0.0
.bss 85776 85776 0 0.0
.data 9512 9512 0 0.0
.rodata 159276 159276 0 0.0
.text 1109328 1109328 0 0.0
bl602+mfd (read/write) 1458978 1458978 0 0.0
.bss 85952 85952 0 0.0
.data 9488 9488 0 0.0
.rodata 158236 158236 0 0.0
.text 1124646 1124646 0 0.0
bl602+rpc (read/write) 1492202 1492202 0 0.0
.bss 93824 93824 0 0.0
.data 9888 9888 0 0.0
.rodata 166844 166844 0 0.0
.text 1140974 1140974 0 0.0
bl702 lighting-app bl702 (read only) 3478 3478 0 0.0
(read/write) 1210203 1210203 0 0.0
.bss 11185 11185 0 0.0
.data 3712 3712 0 0.0
.rodata 108796 108796 0 0.0
.text 979500 979500 0 0.0
bl702+mfd (read only) 3478 3478 0 0.0
(read/write) 1221019 1221019 0 0.0
.bss 11361 11361 0 0.0
.data 3688 3688 0 0.0
.rodata 107736 107736 0 0.0
.text 991254 991254 0 0.0
bl702+rpc (read only) 3478 3478 0 0.0
(read/write) 1301667 1301667 0 0.0
.bss 19669 19669 0 0.0
.data 4248 4248 0 0.0
.rodata 124168 124168 0 0.0
.text 1054208 1054208 0 0.0
bl706-eth (read/write) 1026433 1026433 0 0.0
.bss 23760 23760 0 0.0
.data 3256 3256 0 0.0
.rodata 101968 101968 0 0.0
.text 769096 769096 0 0.0
bl706-wifi (read/write) 1262182 1262182 0 0.0
.bss 10645 10645 0 0.0
.data 3704 3704 0 0.0
.rodata 122960 122960 0 0.0
.text 1002066 1002066 0 0.0
bl702l lighting-app bl702l (read only) 512 512 0 0.0
(read/write) 1179524 1179524 0 0.0
.bss 16396 16396 0 0.0
.data 5072 5072 0 0.0
.rodata 102800 102800 0 0.0
.text 972358 972358 0 0.0
bl702l+mfd (read only) 512 512 0 0.0
(read/write) 1190928 1190928 0 0.0
.bss 16572 16572 0 0.0
.data 5056 5056 0 0.0
.rodata 101740 101740 0 0.0
.text 984680 984680 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 (read only) 798564 798564 0 0.0
(read/write) 177644 177644 0 0.0
.bss 99572 99572 0 0.0
.data 3596 3596 0 0.0
.rodata 84924 84924 0 0.0
.text 713376 713376 0 0.0
lock-ftd LP_EM_CC1354P10_6 (read only) 813856 813856 0 0.0
(read/write) 188116 188116 0 0.0
.bss 110060 110060 0 0.0
.data 3588 3588 0 0.0
.rodata 78552 78552 0 0.0
.text 735040 735040 0 0.0
lock-mtd LP_EM_CC1354P10_6 (read only) 803140 803140 0 0.0
(read/write) 182236 182236 0 0.0
.bss 104180 104180 0 0.0
.data 3588 3588 0 0.0
.rodata 105828 105828 0 0.0
.text 697048 697048 0 0.0
pump-app LP_EM_CC1354P10_6 (read only) 755388 755388 0 0.0
(read/write) 176596 176596 0 0.0
.bss 98304 98304 0 0.0
.data 3580 3580 0 0.0
.rodata 80580 80580 0 0.0
.text 674544 674544 0 0.0
pump-controller-app LP_EM_CC1354P10_6 (read only) 741108 741108 0 0.0
(read/write) 176828 176828 0 0.0
.bss 98536 98536 0 0.0
.data 3580 3580 0 0.0
.rodata 76364 76364 0 0.0
.text 664480 664480 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL (read only) 606054 606054 0 0.0
(read/write) 209588 209588 0 0.0
.bss 202812 202812 0 0.0
.data 1652 1652 0 0.0
.rodata 89654 89654 0 0.0
.text 514276 514276 0 0.0
lock CC3235SF_LAUNCHXL (read only) 651942 651942 0 0.0
(read/write) 209844 209844 0 0.0
.bss 203208 203208 0 0.0
.data 1516 1516 0 0.0
.rodata 110414 110414 0 0.0
.text 539408 539408 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 (read/write) 742179 742179 0 0.0
.app_xip_area 660421 660421 0 0.0
.bss 75364 75364 0 0.0
.data 932 932 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW30739B2-P5-EVK-02 (read/write) 757815 757815 0 0.0
.app_xip_area 672857 672857 0 0.0
.bss 77220 77220 0 0.0
.data 2276 2276 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW30739B2-P5-EVK-03 (read/write) 757815 757815 0 0.0
.app_xip_area 672857 672857 0 0.0
.bss 77220 77220 0 0.0
.data 2276 2276 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW930739M2EVB-02 (read/write) 714035 714035 0 0.0
.app_xip_area 637209 637209 0 0.0
.bss 70488 70488 0 0.0
.data 876 876 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
light-switch CYW30739B2-P5-EVK-01 (read/write) 679695 679695 0 0.0
.app_xip_area 602225 602225 0 0.0
.bss 70956 70956 0 0.0
.data 1052 1052 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW30739B2-P5-EVK-02 (read/write) 695035 695035 0 0.0
.app_xip_area 614453 614453 0 0.0
.bss 72812 72812 0 0.0
.data 2308 2308 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW30739B2-P5-EVK-03 (read/write) 695035 695035 0 0.0
.app_xip_area 614453 614453 0 0.0
.bss 72812 72812 0 0.0
.data 2308 2308 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
lock CYW30739B2-P5-EVK-01 (read/write) 698243 698243 0 0.0
.app_xip_area 617757 617757 0 0.0
.bss 74004 74004 0 0.0
.data 1020 1020 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW30739B2-P5-EVK-02 (read/write) 713647 713647 0 0.0
.app_xip_area 630049 630049 0 0.0
.bss 75860 75860 0 0.0
.data 2276 2276 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW30739B2-P5-EVK-03 (read/write) 713647 713647 0 0.0
.app_xip_area 630049 630049 0 0.0
.bss 75860 75860 0 0.0
.data 2276 2276 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
thermostat CYW30739B2-P5-EVK-01 (read/write) 660771 660771 0 0.0
.app_xip_area 586317 586317 0 0.0
.bss 68164 68164 0 0.0
.data 828 828 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW30739B2-P5-EVK-02 (read/write) 676407 676407 0 0.0
.app_xip_area 598745 598745 0 0.0
.bss 70028 70028 0 0.0
.data 2172 2172 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
CYW30739B2-P5-EVK-03 (read/write) 676407 676407 0 0.0
.app_xip_area 598745 598745 0 0.0
.bss 70028 70028 0 0.0
.data 2172 2172 0 0.0
.rodata 0 0 0 0.0
.text 2040 2040 0 0.0
efr32 lighting-app BRD4187C (read/write) 1071116 1071116 0 0.0
.bss 180016 180016 0 0.0
.data 3432 3432 0 0.0
.text 887648 887648 0 0.0
lock-app BRD4338a (read/write) 962708 962708 0 0.0
.bss 213092 213092 0 0.0
.data 29448 29448 0 0.0
.text 700800 700800 0 0.0
window-app BRD4187C (read/write) 1137720 1137712 -8 -0.0
.bss 164608 164608 0 0.0
.data 3344 3344 0 0.0
.text 969748 969740 -8 -0.0
esp32 all-clusters-app c3devkit (read only) 1215510 1215510 0 0.0
(read/write) 1751408 1751408 0 0.0
.dram0.bss 74624 74624 0 0.0
.dram0.data 13652 13652 0 0.0
.flash.rodata 253600 253600 0 0.0
.flash.text 1215510 1215510 0 0.0
.iram0.text 75570 75570 0 0.0
m5stack (read only) 1257175 1257175 0 0.0
(read/write) 537988 537988 0 0.0
.dram0.bss 81384 81384 0 0.0
.dram0.data 35196 35196 0 0.0
.flash.rodata 285488 285488 0 0.0
.flash.text 1251011 1251011 0 0.0
.iram0.text 125403 125403 0 0.0
linux air-purifier-app debug (read only) 2715821 2715821 0 0.0
(read/write) 132464 132464 0 0.0
.bss 47752 47752 0 0.0
.data 2272 2272 0 0.0
.data.rel.ro 76440 76440 0 0.0
.dynamic 608 608 0 0.0
.got 4576 4576 0 0.0
.init 27 27 0 0.0
.init_array 800 800 0 0.0
.rodata 186608 186608 0 0.0
.text 2346277 2346277 0 0.0
all-clusters-app debug (read only) 6028601 6028601 0 0.0
(read/write) 484008 484008 0 0.0
.bss 136032 136032 0 0.0
.data 4560 4560 0 0.0
.data.rel.ro 335960 335960 0 0.0
.dynamic 624 624 0 0.0
.got 5344 5344 0 0.0
.init 27 27 0 0.0
.init_array 1440 1440 0 0.0
.rodata 353488 353488 0 0.0
.text 5236467 5236467 0 0.0
all-clusters-minimal-app debug (read only) 5311961 5311961 0 0.0
(read/write) 239960 239960 0 0.0
.bss 128896 128896 0 0.0
.data 4464 4464 0 0.0
.data.rel.ro 99496 99496 0 0.0
.dynamic 624 624 0 0.0
.got 5264 5264 0 0.0
.init 27 27 0 0.0
.init_array 1168 1168 0 0.0
.rodata 292266 292266 0 0.0
.text 4779859 4779859 0 0.0
bridge-app debug (read only) 4702537 4702537 0 0.0
(read/write) 220872 220872 0 0.0
.bss 119424 119424 0 0.0
.data 6240 6240 0 0.0
.data.rel.ro 88464 88464 0 0.0
.dynamic 624 624 0 0.0
.got 5232 5232 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 232682 232682 0 0.0
.text 4244435 4244435 0 0.0
chip-tool debug (read only) 12147769 12147769 0 0.0
(read/write) 524256 524256 0 0.0
.bss 95000 95000 0 0.0
.data 5122 5122 0 0.0
.data.rel.ro 416904 416904 0 0.0
.dynamic 624 624 0 0.0
.got 5736 5736 0 0.0
.init 27 27 0 0.0
.init_array 832 832 0 0.0
.rodata 453305 453305 0 0.0
.text 10983827 10983827 0 0.0
chip-tool-ipv6only arm64 (read only) 11475252 11475252 0 0.0
(read/write) 589960 589960 0 0.0
.bss 104008 104008 0 0.0
.data 4520 4520 0 0.0
.data.rel.ro 457000 457000 0 0.0
.dynamic 512 512 0 0.0
.got 17240 17240 0 0.0
.init 24 24 0 0.0
.init_array 280 280 0 0.0
.rodata 357588 357588 0 0.0
.text 10233032 10233032 0 0.0
lighting-app debug+rpc+ui (read only) 5626113 5626113 0 0.0
(read/write) 229672 229672 0 0.0
.bss 120368 120368 0 0.0
.data 4896 4896 0 0.0
.data.rel.ro 96880 96880 0 0.0
.dynamic 672 672 0 0.0
.got 5864 5864 0 0.0
.init 27 27 0 0.0
.init_array 976 976 0 0.0
.rodata 356500 356500 0 0.0
.text 5017763 5017763 0 0.0
lock-app debug (read only) 4769561 4769561 0 0.0
(read/write) 208032 208032 0 0.0
.bss 114664 114664 0 0.0
.data 4192 4192 0 0.0
.data.rel.ro 82472 82472 0 0.0
.dynamic 624 624 0 0.0
.got 5184 5184 0 0.0
.init 27 27 0 0.0
.init_array 880 880 0 0.0
.rodata 258570 258570 0 0.0
.text 4294643 4294643 0 0.0
ota-provider-app debug (read only) 4377433 4377433 0 0.0
(read/write) 196568 196568 0 0.0
.bss 114528 114528 0 0.0
.data 4368 4368 0 0.0
.data.rel.ro 71712 71712 0 0.0
.dynamic 624 624 0 0.0
.got 4552 4552 0 0.0
.init 27 27 0 0.0
.init_array 752 752 0 0.0
.rodata 211434 211434 0 0.0
.text 3968307 3968307 0 0.0
ota-requestor-app debug (read only) 4508153 4508153 0 0.0
(read/write) 200936 200936 0 0.0
.bss 115424 115424 0 0.0
.data 4768 4768 0 0.0
.data.rel.ro 74816 74816 0 0.0
.dynamic 624 624 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 800 800 0 0.0
.rodata 217546 217546 0 0.0
.text 4088371 4088371 0 0.0
shell debug (read only) 2999945 2999945 0 0.0
(read/write) 159440 159440 0 0.0
.bss 63504 63504 0 0.0
.data 1424 1424 0 0.0
.data.rel.ro 88672 88672 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 1112 1112 0 0.0
.rodata 190400 190400 0 0.0
.text 2630514 2630514 0 0.0
thermostat-no-ble arm64 (read only) 4495516 4495516 0 0.0
(read/write) 246464 246464 0 0.0
.bss 123000 123000 0 0.0
.data 3408 3408 0 0.0
.data.rel.ro 105912 105912 0 0.0
.dynamic 512 512 0 0.0
.got 8968 8968 0 0.0
.init 24 24 0 0.0
.init_array 448 448 0 0.0
.rodata 161988 161988 0 0.0
.text 3992296 3992296 0 0.0
tv-app debug (read only) 5826217 5826217 0 0.0
(read/write) 355256 355256 0 0.0
.bss 245136 245136 0 0.0
.data 6560 6560 0 0.0
.data.rel.ro 96280 96280 0 0.0
.dynamic 624 624 0 0.0
.got 5464 5464 0 0.0
.init 27 27 0 0.0
.init_array 1184 1184 0 0.0
.rodata 296938 296938 0 0.0
.text 5283075 5283075 0 0.0
tv-casting-app debug (read only) 9987129 9987129 0 0.0
(read/write) 345736 345736 0 0.0
.bss 159512 159512 0 0.0
.data 3008 3008 0 0.0
.data.rel.ro 176240 176240 0 0.0
.dynamic 624 624 0 0.0
.got 5096 5096 0 0.0
.init 27 27 0 0.0
.init_array 1224 1224 0 0.0
.rodata 387416 387416 0 0.0
.text 9128771 9128771 0 0.0
mbed lock-app-release cy8cproto_062_4343w (read only) 6224 6224 0 0.0
(read/write) 2537336 2537336 0 0.0
.bss 220808 220808 0 0.0
.data 5216 5216 0 0.0
.text 1500020 1500020 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1061272 1061272 0 0.0
bss 139161 139161 0 0.0
rodata 101696 101696 0 0.0
text 773104 773104 0 0.0
nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1238920 1238920 0 0.0
bss 137517 137517 0 0.0
rodata 151408 151408 0 0.0
text 799972 799972 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1008912 1008912 0 0.0
bss 138059 138059 0 0.0
rodata 88952 88952 0 0.0
text 734648 734648 0 0.0
nxp contact k32w0+release (read only) 576668 576668 0 0.0
(read/write) 83172 83172 0 0.0
.bss 67888 67888 0 0.0
.data 2196 2196 0 0.0
.text 576132 576132 0 0.0
k32w1+release (read only) 1024 1024 0 0.0
(read/write) 704220 704220 0 0.0
.bss 71240 71240 0 0.0
.data 2864 2864 0 0.0
.text 590736 590736 0 0.0
light k32w0+release (read only) 610776 610776 0 0.0
(read/write) 82640 82640 0 0.0
.bss 67336 67336 0 0.0
.data 2216 2216 0 0.0
.text 610240 610240 0 0.0
k32w1+release (read only) 1024 1024 0 0.0
(read/write) 796064 796064 0 0.0
.bss 80776 80776 0 0.0
.data 2072 2072 0 0.0
.text 673848 673848 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 826256 826256 0 0.0
(read/write) 1827524 1827524 0 0.0
.bss 204340 204340 0 0.0
.data 2744 2744 0 0.0
.text 1612052 1612052 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 829352 829352 0 0.0
(read/write) 1748788 1748788 0 0.0
.bss 201268 201268 0 0.0
.data 2720 2720 0 0.0
.text 1536412 1536412 0 0.0
light cy8ckit_062s2_43012 (read only) 836072 836072 0 0.0
(read/write) 1667260 1667260 0 0.0
.bss 194732 194732 0 0.0
.data 2536 2536 0 0.0
.text 1461604 1461604 0 0.0
lock cy8ckit_062s2_43012 (read only) 809008 809008 0 0.0
(read/write) 1695924 1695924 0 0.0
.bss 221812 221812 0 0.0
.data 2520 2520 0 0.0
.text 1463204 1463204 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1134316 1134316 0 0.0
.bss 102636 102636 0 0.0
.data 856 856 0 0.0
.text 646696 646696 0 0.0
lock-app qpg6105+debug (read/write) 1094108 1094108 0 0.0
.bss 97308 97308 0 0.0
.data 868 868 0 0.0
.text 606492 606492 0 0.0
stm32 light STM32WB5MM-DK (read/write) 605993 605993 0 0.0
.bss 128500 128500 0 0.0
.data 688 688 0 0.0
.rodata 80516 80516 0 0.0
.text 386544 386544 0 0.0
telink air-quality-sensor-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 834314 834314 0 0.0
bss 49884 49884 0 0.0
text 624974 624974 0 0.0
all-clusters-app tlsr9518adk80d (read only) 29042 29042 0 0.0
(read/write) 1096704 1096704 0 0.0
bss 101552 101552 0 0.0
text 797692 797692 0 0.0
all-clusters-minimal-app tlsr9528a (read only) 47960 47960 0 0.0
(read/write) 1059196 1059196 0 0.0
bss 110048 110048 0 0.0
text 773032 773032 0 0.0
bridge-app tlsr9518adk80d (read only) 29042 29042 0 0.0
(read/write) 914836 914836 0 0.0
bss 92804 92804 0 0.0
text 656626 656626 0 0.0
contact-sensor-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 836682 836682 0 0.0
bss 49928 49928 0 0.0
text 627394 627394 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a (read only) 51584 51584 0 0.0
(read/write) 937672 937672 0 0.0
bss 77540 77540 0 0.0
text 704040 704040 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d (read only) 29122 29122 0 0.0
(read/write) 1091036 1091036 0 0.0
bss 99876 99876 0 0.0
text 794500 794500 0 0.0
lock-app-dfu tlsr9528a (read only) 51584 51584 0 0.0
(read/write) 911792 911792 0 0.0
bss 69208 69208 0 0.0
text 660800 660800 0 0.0
ota-requestor-app tlsr9518adk80d (read only) 29042 29042 0 0.0
(read/write) 933640 933640 0 0.0
bss 92516 92516 0 0.0
text 675612 675612 0 0.0
pump-app tlsr9258a (read only) 52568 52568 0 0.0
(read/write) 831280 831280 0 0.0
bss 58172 58172 0 0.0
text 621438 621438 0 0.0
pump-controller-app tlsr9518adk80d (read only) 31872 31872 0 0.0
(read/write) 800376 800376 0 0.0
bss 56108 56108 0 0.0
text 599310 599310 0 0.0
shell tlsr9518adk80d (read only) 29042 29042 0 0.0
(read/write) 676244 676244 0 0.0
bss 73388 73388 0 0.0
text 461768 461768 0 0.0
smoke_co_alarm-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 844534 844534 0 0.0
bss 51556 51556 0 0.0
text 634062 634062 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d (read only) 32220 32220 0 0.0
(read/write) 859201 859201 0 0.0
bss 59724 59724 0 0.0
text 642850 642850 0 0.0
thermostat tlsr9518adk80d (read only) 31872 31872 0 0.0
(read/write) 825924 825924 0 0.0
bss 56432 56432 0 0.0
text 618872 618872 0 0.0
window-covering tlsr9258a (read only) 52568 52568 0 0.0
(read/write) 835968 835968 0 0.0
bss 58388 58388 0 0.0
text 623706 623706 0 0.0

@woody-apple woody-apple merged commit 550b1c1 into project-chip:master May 9, 2024
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants